<template>
  <div id="Task">
    <v-detail :detailData="inputData" :inputConfig="inputConfig" :rules="rules" ref="detail"></v-detail>
  </div>
</template>

<script>
import detail from "commons/Detail";
import baseMixin from "@/mixins/BaseMixin";

export default {
  name: "Task",
  mixins: [baseMixin],
  props: {
    inputData: {
      type: Object
    }
  },
  data() {
    return {
      addflag: true,
      rules: {},
    }
  },
  computed: {
    inputConfig() {
      return [
        [
          {
            type: "checkbox",
            label: this.$t('config.enablepackingdefault'),
            props: "enablepackingdefault",
            disabled: this.addflag
          },
          {
            type: "checkbox",
            label: this.$t('config.inspectatpack'),
            props: "inspectatpack",
            disabled: this.addflag
          },
          {
            type: "checkbox",
            label: this.$t('config.multizoneplpa'),
            props: "multizoneplpa",
            disabled: this.addflag
          },
          {
            type: "checkbox",
            label: this.$t('config.skusetuprequired'),
            props: "skusetuprequired",
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.defaultskurotation'),
            props: "defaultskurotation",
            options: this.getOptions('querycodeLkup/SKUROTATE'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.defaultrotation'),
            props: "defaultrotation",
            options: this.getOptions('querycodeLkup/ROTATION'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.orderbreakdefault'),
            props: "orderbreakdefault",
            options: this.getOptions('querycodeLkup/YESNO'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.defdapicksort'),
            props: "defdapicksort",
            options: this.getOptions('querycodeLkup/RPLNSORT'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.defrplnsort'),
            props: "defrplnsort",
            options: this.getOptions('querycodeLkup/RPLNSORT'),
            disabled: this.addflag
          },
        ],
        [
          {
            type: "select",
            label: this.$t('config.defaultpickstrategy'),
            props: "defaultstrategy",
            options: this.getOptions('queryAllocatestrategyDropDown'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.defaultputawaystrategy'),
            props: "defaultputawaystrategy",
            options: this.getOptions('queryPutawaystrategyDropDown'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.amstrategykey'),
            props: "amstrategykey",
            options: this.getOptions('queryAmstrategyDropDown'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.createpataskonrfreceipt'),
            props: "createpataskonrfreceipt",
            options: this.getOptions('querycodeLkup/TMTSKRFRC'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.calculateputawaylocation'),
            props: "calculateputawaylocation",
            options: this.getOptions('querycodeLkup/TMCALCPALO'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.mixedlpnputstrategy'),
            props: "mixedlpnputstrategy",
            options: this.getOptions('queryPutawaystrategyDropDown'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.reqreasonshortship'),
            props: "reqreasonshortship",
            options: this.getOptions('querycodeLkup/YESNO'),
            disabled: this.addflag
          },
        ],
        [
          {
            type: "input",
            label: this.$t('config.defaultqcloc'),
            props: "defaultqcloc",
            disabled: this.addflag
          },
          {
            type: "input",
            label: this.$t('config.defaultqclocout'),
            props: "defaultqclocout",
            disabled: this.addflag
          },
          {
            type: "input",
            label: this.$t('config.defaultreturnsloc'),
            props: "defaultreturnsloc",
            disabled: this.addflag
          },
          {
            type: "input",
            label: this.$t('config.defaultpackinglocation'),
            props: "defaultpackinglocation",
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.packingvalidationtemplate'),
            props: "packingvalidationtemplate",
            options: this.getOptions('queryPackingvalidationtemplateDropDown'),
            disabled: this.addflag
          },
          {
            type: "select",
            label: this.$t('config.boxGroup'),
            props: "cartongroup",
            options: this.getOptions('queryCartonizationDropDown'),
            disabled: this.addflag
          }
        ]
      ]
    }
  },
  methods: {},
  mounted() {
    if (this.$store.state.wms.toUpperCase().includes('WMWHSE')) {
      this.addflag = false;
    }
  },
  components: {
    "v-detail": detail
  }
}
</script>

<style scoped>
</style>
